import axios from "axios";

export default {
  savebusinessProject(params) {
    // 保存投后项目
    return axios.post("/security/business/savebusinessProject", params);
  },
  saveRiskMonitor(params) {
    // 保存风险监控
    return axios.post("/security/business/saveRiskMonitor", params);
  },
  savebusinessExit(params) {
    // 保存退出监控
    return axios.post("/security/business/savebusinessExit", params);
  },
  getbusinessProject(projectId) {
    // 获取单个投后项目
    return axios.get(
      `/security/business/getbusinessProject?projectId=${projectId}`
    );
  },
  getRiskMonitor(id) {
    // 获取单个风险监控
    return axios.get(`/security/business/getRiskMonitor?riskId=${id}`);
  },
  getbusinessExit(id) {
    // 获取单个退出监控
    return axios.get(`/security/business/getbusinessExit?exitId=${id}`);
  },
  getbusinessProjectList() {
    // 获取投后项目
    return axios.get(
      `/security/business/businessProjectList?pageNo=0&pageSize=100`
    );
  },
  getRiskMonitorList(projectId) {
    // 获取风险监控
    return axios.get(
      `/security/business/getRiskMonitorList?projectId=${projectId}`
    );
  },
  getbusinessExitList(projectId) {
    // 获取退出监控
    return axios.get(
      `/security/business/businessExitList?projectId=${projectId}`
    );
  },
  deletebusinessProject(params) {
    // 删除投后项目
    return axios.post("/security/business/deletebusinessProject", params, {
      headers: {
        "Content-Type": "application/x-www-form-urlencoded"
      }
    });
  },
  deleteRiskMonitor(params) {
    // 删除风险监控
    return axios.post("/security/business/deleteRiskMonitor", params, {
      headers: {
        "Content-Type": "application/x-www-form-urlencoded"
      }
    });
  },
  deletebusinessExit(params) {
    // 删除退出监控
    return axios.post("/security/business/deletebusinessExit", params, {
      headers: {
        "Content-Type": "application/x-www-form-urlencoded"
      }
    });
  }
};
